package com.esms.service.impl;

import com.esms.dao.MenuPermMapper;
import com.esms.po.MenuPerm;
import com.esms.service.LoginMenuPermService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * @author : [ko]
 * @version : [v1.0]
 * @description : [一句话描述该类的功能]
 * @createTime : [2022/3/14 17:35]
 * @updateUser : [ko]
 * @updateTime : [2022/3/14 17:35]
 * @updateRemark : [说明本次修改内容]
 */
@Service
public class LoginMenuPermServiceImpl  implements LoginMenuPermService {
	@Autowired
	public MenuPermMapper menuPermMapper = null;

	public MenuPerm selectShowMenuPermAccountByFlag(String menuFlag) {
		return menuPermMapper.selectShowMenuPermAccountByFlag(menuFlag);
	}

	@Override
	public Boolean whetherHasMenu(String menuFlag, String account) {
		return menuPermMapper.selectAccountsByFlag(menuFlag).contains(account);
	}

}
